<style type="text/css">
	#feedback { font-size: 1.4em; }
	#menuSelect .ui-selecting { background: #FECA40; }
	#menuSelect .ui-selected { background: #F39814; color: white; }
	#menuSelect { list-style-type: none; margin: 0; padding: 0; width: 60%; }
	#menuSelect li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
	#menuSelect li.subMenu{margin-left: 20px;}

	#typeSelect .ui-selecting { background: #FECA40; }
	#typeSelect .ui-selected { background: #F39814; color: white; }
	#typeSelect { list-style-type: none; margin: 0; padding: 0; width: 60%; }
	#typeSelect li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
</style>

<script type="text/javascript">
	$(function() {
		$("#editDate").datepicker({ dateFormat: 'dd.mm.yy' });
		$("#menuSelect").children().click(function() {
			$(this).toggleClass("ui-selected").siblings().removeClass("ui-selected");
			$(this).each(function(){
				$("#editMid").val(this.title);
			});
		}); 
		$("#typeSelect").children().click(function() {
			$(this).toggleClass("ui-selected").siblings().removeClass("ui-selected");
			$(this).each(function(){
				$("#editType").val(this.title);
			});
		});		
	});
</script>
<form action='<?=$links->makeLink('adm/admpage/edit/'.$page[0]->id)?>' method='POST'>
	<fieldset>
			<label for="editTitle">Заголовок</label>
			<input type="text" name="title" id="editTitle" value="<?=$page[0]->title?>" minLenght='5' />
			<label for="editDate">Дата</label>
			<input type="text" name="time" id="editDate" value="<?=$page[0]->time?>" minLenght='5' />
	</fieldset>

	<?$this->spaw->show();?>

	<fieldset>
		<input type="hidden" name="mid" id="editMid" value="<?=$page[0]->mid?>" />
		<input type="hidden" name="type" id="editType" value="<?=$page[0]->type?>" />
	</fieldset>

	<label for="menuSelect">Раздел:</label>
	<ol id="menuSelect">
		<?=$links->menuSelect($menu,$page[0]->mid);?>
	</ol>

	<label for="typeSelect">Тип страницы:</label>
	<ol id="typeSelect">
		<li class="ui-widget-content<?if($page[0]->type == 'ctn') echo ' ui-selected';?>" title="ctn">
																					Текст &amp; Картинки</li>
		<li class="ui-widget-content<?if($page[0]->type == 'gallery') echo ' ui-selected';?>" title="gallery">Галерея</li>
	</ol>

		<input type="button" value="Назад" class="ui-button ui-state-default ui-corner-all" onClick='history.back()' />
		<input type="submit" value="Изменить" class="ui-button ui-state-default ui-corner-all" />
</form>
